package com.job.structureType.combination;

import javax.swing.*;

/**
 * @Author 王博
 * @DateTime 2025-06-17 08:44
 */
public class MenuItem extends MenuComponent {
    MenuItem(String name, Integer level) {
        super(name, level);
    }

    @Override
    public void print() {
        for (int i = 0; i < getLevel(); i++) {
            System.out.print("-");
        }
        System.out.println(getName());
    }
}
